package com.mystudy;

public class Saler extends Employee implements ImoneyAble{
	private int baseMoney;
	private int pieces;
	private int moneyPieces;
	
	public Saler() {};
	public Saler(String name,int baseMoney,int pieces,int moneyPieces) {
		super(name);
		this.baseMoney = baseMoney;
		this.pieces = pieces;
		this.moneyPieces = moneyPieces;
	}
	public int getBaseMoney() {
		return baseMoney;
	}
	public void setBaseMoney(int baseMoney) {
		this.baseMoney = baseMoney;
	}
	public int getPieces() {
		return pieces;
	}
	public void setPieces(int pieces) {
		this.pieces = pieces;
	}
	public int getMoneyPieces() {
		return moneyPieces;
	}
	public void setMoneyPieces(int moneyPieces) {
		this.moneyPieces = moneyPieces;
	}
	@Override
	public double computeMoney() {
		// TODO Auto-generated method stub
		return this.baseMoney + this.pieces * this.moneyPieces;
				
	}
	
}
